public abstract class Operation {

    protected double NumberA;
    protected double NumberB;
    public void setValue(double NumberA,double NumberB){
        this.NumberA=NumberA;
        this.NumberB=NumberB;
    }
    public abstract double getResult();
}

class SubOperation extends Operation{

    @Override
    public double getResult() {
        return NumberA-NumberB;
    }

}
class DivOperation extends Operation{

    @Override
    public double getResult() {
        return NumberA/NumberB;
    }

}
class MulOperation extends Operation{

    @Override
    public double getResult() {
        return NumberA*NumberB;
    }

}
class AddOperation extends Operation{

    @Override
    public double getResult() {
        return NumberA+NumberB;
    }

}
